package etr.bk.gui.rpan;

import etr.bk.gui.*;
import etr.bk.gui.rpan.image.PreviewImagePanel;
import etr.bk.gui.rpan.info.InfoPanel;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;

import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import org.h2.jdbc.JdbcSQLException;

public class RPanel extends JPanel
{
	private  InfoPanel infoTab;
	private  PreviewImagePanel fotoPanel; 

	public RPanel()
	{
		
		this.setLayout(new BorderLayout());
		this.setBorder(BorderFactory.createRaisedBevelBorder());
		
		JTabbedPane tabbedInfoFotoPanel = new JTabbedPane();
		
		this.infoTab = new InfoPanel();
		this.fotoPanel =  new PreviewImagePanel();
		
		tabbedInfoFotoPanel.addTab("   Info   ", infoTab);
		tabbedInfoFotoPanel.addTab("   Foto   ", fotoPanel);
		
		this.add(tabbedInfoFotoPanel,BorderLayout.CENTER);
		
		//--------------add listener------------
		
		MainListener mListener = MainListener.getListener();
		mListener.setTabledPan(tabbedInfoFotoPanel);
	}
	
	
	public PreviewImagePanel getFotoPanel()
	{
		return fotoPanel;
	}

}

